[WIP] Refactor entrypoint.sh by extracting initialization phases into functions#5285
Conversation
|
@copilot merge main |
…ialization-phases
Addressed in |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
Refactors the agent container entrypoint (containers/agent/entrypoint.sh) by extracting its initialization phases into named functions and introducing a simple structural test intended to ensure the phased main() orchestration remains intact.
Changes:
- Extracted entrypoint phases (banner, identity setup, DNS/SSL, health checks, logging, capability selection, dispatch) into dedicated bash functions and added a
main()orchestrator. - Split execution paths into
run_chroot_commandvsrun_non_chroot_command, withmain()deciding based onAWF_CHROOT_ENABLED. - Added a new shell test (
tests/entrypoint-phase-functions.test.sh) that checks for required function definitions and call ordering withinmain().
Show a summary per file
| File | Description |
|---|---|
| containers/agent/entrypoint.sh | Refactors entrypoint into discrete phase functions and adds main() to orchestrate the sequence and chroot/non-chroot dispatch. |
| tests/entrypoint-phase-functions.test.sh | Adds a structural smoke test to verify function presence and call ordering in main(). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
| #!/bin/bash | ||
| set -e | ||
|
|
||
| ENTRYPOINT="$(dirname "$0")/../containers/agent/entrypoint.sh" | ||
|
|
|
⏳ Copilot review left inline comments. @copilot To proceed:
|
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
❌ Smoke Claude failed |
|
❌ Security Guard failed. Please review the logs for details. |
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test completed with partial failures. Results reported in PR comment. |
|
✅ Build Test Suite completed successfully! |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🔌 Smoke Services — All services reachable! ✅ |
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed... |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Contribution Check completed successfully! |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
Smoke Test: Copilot BYOK (Direct Mode) — PASS ✅ Running in direct BYOK mode via
All systems nominal.
|
🔬 Smoke Test Results — PASS
PR: [WIP] Refactor entrypoint.sh by extracting initialization phases into functions Overall: PASS ✅
|
🔥 Smoke Test: Copilot PAT — PASS
Overall: PASS · Auth mode: PAT (COPILOT_GITHUB_TOKEN) cc
|
|
Smoke test: FAIL
|
Gemini Engine Smoke Test
Overall status: FAIL Recently Merged PRs:
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
🔍 Smoke Test: API Proxy OpenTelemetry Tracing
Result: All scenarios pass. ✅
|
|
Smoke Test:
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot environments.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results: FAIL ❌
Overall: FAIL —
|
containers/agent/entrypoint.shinto named functions with no behavior change